package WriteData;
# by Tao Lang: langtao123xxx@126.com
use strict;
use warnings;
use autodie qw/open close/;

use Mojo::Base 'Exporter';

our @EXPORT_OK = qw/write_data2file/;

sub write_data2file {
    my($d, $fname) = @_;
    
    open my $fh, '>', $fname;
    print $fh $$d;
    close $fh;
}

1;
